<!--
 * @Description: 垂直居中
 * @Author: zzj
 * @Date: 2021-08-25 15:32:34
 * @LastEditors: zzj
 * @LastEditTime: 2021-08-25 15:38:40
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>垂直居中</title>
    <style>
        .box{
            background-color: wheat;
            color: white;
        }
        .box .line{
            display: inline-block;
            width: 1px;
            height: 20px;
            background-color: white;

            vertical-align: middle;
        }
    </style>
</head>
<body>
    <div class="box">
        <span>span</span>
        <span class="line"></span>
        <span>span</span>
    </div>
</body>
</html>